1. Field of the Invention
The invention relates to a data processing apparatus, a data processing method, a data processing program, a data structure, a recording medium, a reproducing apparatus, a reproducing method, and a reproducing program which are suitable to be used when video data which has been compression-encoded by using an inter-frame compression is partially transferred.
2. Description of the Related Arts
A data recording and reproducing apparatus for recording a digital video signal and a digital audio signal onto a recording medium and reproducing such signals from the recording medium has been known. As a recording medium for recording the digital video signal and the digital audio signal, in recent years, a recording medium such as optical disc, hard disk, semiconductor memory, and the like in which a random access can be performed has widely been used for recording and reproducing the digital video signal and the digital audio signal.
Since the digital video signal has a very large data capacity, generally, it is compression-encoded by a predetermined system and recorded onto the recording medium. In recent years, an MPEG2 (Moving Picture Experts Group 2) system has been known as a standard compression encoding system. In the MPEG2, the digital video signal is compression-encoded by using a DCT (Discrete Cosine Transform) and a motion compensation and a data compression ratio is further raised by using a variable length code.
A data stream structure of the MPEG2 will now be schematically described. The MPEG2 is constructed by combining a motion compensation predictive coding and a compression encoding according to the DCT. A data structure of the MPEG2 has a layer structure constructed by a block layer, a macro block layer, a slice layer, a picture layer, a GOP layer, and a sequence layer from the lower order. The block layer is constructed by a DCT block serving as a unit of executing the DCT. The macro block layer is constructed by a plurality of DCT blocks. The slice layer is constructed by a header portion and one or more macro blocks. The picture layer is constructed by a header portion and one or more slices. The picture corresponds to one picture plane. A boundary between the layers can be discriminated by a predetermined identification code (ID code).
The GOP layer is constructed by a header portion, an I (Intra-coded) picture as a picture based on an intra-frame coding, and a P (Predictive-coded) picture and a B (Bi-directionally predictive coded) picture as a picture based on a predictive coding. The I picture can be decoded only by its own information. The P picture needs a front image as a reference image and the B picture needs front and rear images as reference images. Each of the P and B pictures is not solely decoded. For example, the P picture is decoded by using the I picture or the P picture, as a reference image, which is time-precedent to its own P picture. The B picture is decoded by using the two I pictures or two P pictures before and after its own B picture as reference images. A group which includes at least one I picture and has been completed by itself is called a GOP (Group Of Picture) and is a minimum unit which can be independently accessed in the stream of the MPEG.
The GOP is constructed by one or a plurality of pictures. Hereinbelow, for convenience of explanation, the GOP constructed only by one I picture is called a single GOP and the GOP constructed by a plurality of pictures including the I picture and the P and/or B picture(s) is called a long GOP. By constructing the GOP only by one I picture, edition of a frame unit can be made easy and since the inter-frame predictive coding is not executed, higher picture quality can be obtained. In the long GOP, since the inter-frame predictive coding is executed, there is such an advantage that a compression efficiency is high.
In the long GOP, there are two kinds of GOPs: a closed GOP which can be completely decoded in the GOP and has a closed structure in the GOP; and an open GOP which can use information of the one-precedent GOP in the coding order upon decoding. Since the open GOP can be decoded by using information of an amount larger than that for the closed GOP, the high picture quality can be obtained. Therefore, the open GOP is generally used.
As a method of compression-encoding a video signal of an SD (Standard Definition) format, for example, a DV format whose bit rate is equal to 25 Mbps (megabits/second) or an IMX format whose bit rate is equal to 50 Mbps and which uses only the I picture of the MPEG2 has been known. Particularly, in a video apparatus which is used in a broadcasting station or the like, the video signal of the SD format is used by the foregoing single GOP, thereby realizing the high picture quality and an editing environment of high precision.
In recent years, in association with the execution of a digital high-definition broadcasting or the like, an HD (High Definition) format whose resolution is higher than that of the SD format has been used. According to the HD format, since a bit rate is high in association with the realization of the high resolution, according to the single GOP, it is difficult to execute the long-time recording to the recording medium. Therefore, the video signal in the HD format is used in the foregoing long GOP.
A decoding process in the case of the long GOP will now be described with reference to FIGS. 1A to 1C. It is assumed here that one GOP is constructed by 15 pictures in total of one I picture, four P pictures, and ten B pictures. Display order of the I, P, and B pictures in the GOP is set to “B0B1I2B3B4P5B6B7P8B9B10P11B12B13P14” as shown in an example in FIG. 1A. Each suffix indicates the display order.
In this example, the first two B0 and B1 pictures are the pictures which have been predicted by using the last P14 picture in the one-precedent GOP and the I2 picture in the present GOP and decoded. The first P5 picture in the GOP is the picture which has been predicted from the I2 picture and decoded. Each of the other P8, P11, and P14 pictures is the picture which has been predicted by using the one-precedent P picture and decoded. Each of the B pictures after the I picture is the picture which has been predicted from the front and rear I and/or P pictures and decoded.
Since the B picture is the picture which has been predicted by using the time-precedent and time-subsequent I or P pictures and decoded, it is necessary to decide the layout order of the I, P, and B pictures on the stream or the recording medium in consideration of decoding order in a decoder. That is, the I and/or P pictures to decode the B picture have to be typically decoded prior to the B picture.
In the above example, a layout of the pictures on the stream or the recording medium is set to “I2B0B1P5B3B4P8B6B7P11B9B10P14B12B13” as shown in an example in FIG. 1B and the pictures are decoded in this order. Each suffix indicates the display order in correspondence to FIG. 1A.
In the decoding process in the decoder, as shown in FIG. 1C, first, the I2 picture is decoded and the B0 and B1 pictures are predicted by using the decoded I2 picture and the last (in the display order) P14 picture in the one-precedent GOP and decoded. The B0 and B1 pictures are outputted from the decoder in the decoding order. Subsequently, the I2 picture is outputted. When the B1 picture is outputted, the P5 picture is subsequently predicted by using the I2 picture and decoded. The B3 and B4 pictures are predicted by using the I2 and P5 pictures and decoded. The decoded B3 and B4 pictures are outputted from the decoder in the decoding order. Subsequently, the P5 picture is outputted.
In a manner similar to the above, such processes that the P or I picture which is used for prediction of the B picture is decoded prior to the B picture, the B picture is predicted by using the decoded P or I picture and decoded, the decoded B picture is outputted, and subsequently, the P or I picture used to decode the B picture is outputted are repeated. The picture layout as shown in FIG. 1B on the recording medium or the stream is generally used.
In recent years, a processing ability has remarkably been improved in computer apparatuses, particularly, in small and reasonable computer apparatuses such as personal computers. Therefore, the video data as mentioned above is often processed by the personal computer or the like. For example, the video data recorded by a recording and reproducing apparatus in which the random-accessible recording medium as mentioned above is used as a recording medium is reproduced by the recording and reproducing apparatus and transferred to the computer apparatus through a predetermined interface. Since the computer apparatus fundamentally handles the data on a file unit basis, the transmitted data is converted into a predetermined file format and stored into the recording medium such as a hard disk drive or the like.
In the recording and reproducing apparatus in which the random-accessible recording medium is used for recording of the video data, generally, the video data is preliminarily recorded in a file format into the recording medium. For example, in the case of using the optical disc as a recording medium, the optical disc is used in a format corresponding to that of the computer apparatus such as a UDF (Universal Disk Format) and the video data is recorded as a file according to the format of the UDF.
If the video data is recorded by the recording and reproducing apparatus into the recording medium formatted by the format corresponding to the computer apparatus as mentioned above, for example, when the recording and reproducing apparatus and the computer apparatus are connected by a predetermined interface, the computer apparatus can read out the video data by directly accessing the file on the recording medium.
A communicating speed of a communication network has also been remarkably improved in recent years and the video data can be transferred by the communication network. In the case of transferring the file by using the computer apparatus through the communication network, a protocol of the file transfer called an FTP (File Transfer Protocol) is generally used. For example, a technique for transferring the video file by using the FTP has been disclosed in the Official Gazette of U.S. Pat. No. 6,119,144.